// ice-design 主品牌色组件功能色关系映射
const primaryColorMap = {
  '$balloon-primary-color-bg': '$color-brand1-1',
  '$balloon-primary-color-close': '$color-brand1-5',
  '$balloon-primary-color-close-hover': '$color-brand1-7',
  '$balloon-primary-color': '$color-brand1-6',
  '$breadcrumb-text-color-hover': '$color-brand1-7',
  '$btn-text-normal-color': '$color-brand1-6',
  '$btn-text-normal-color-hover': '$color-brand1-9',
  '$btn-primary-bg-hover': '$color-brand1-5',
  '$calendar-card-cell-hover-background': '$color-brand1-5',
  '$calendar-card-cell-select-background': '$color-brand1-5',
  '$calendar-fullscreen-cell-hover-background': '$color-brand1-2',
  '$calendar-fullscreen-cell-select-background': '$color-brand1-2',
  '$calendar-card-cell-today-color': '$color-brand1-6',
  '$calendar-card-cell-range-background': '$color-brand1-5',
  '$calendar-card-cell-range-color': '$color-brand1-2',
  '$card-title-prefix-border-color': '$color-brand1-7',
  '$menu-color-selected': '$color-brand1-6',
  '$menu-background-hover': '$color-brand1-2',
  '$menu-color-hover': '$color-brand1-6',
  '$menu-background-focused': '$color-brand1-2',
  '$menu-color-focused': '$color-brand1-6',
  '$nav-normal-hoz-item-hover-bg-color': '$color-brand1-2',
  '$nav-normal-hoz-item-select-bg-color': '$color-brand1-2',
  '$navigation-line-item-background-hover': '$color-brand1-2',
  '$navigation-line-item-border-color-selected': '$color-brand1-9',
  '$navigation-line-item-color-hover': '$color-brand1-6',
  '$navigation-line-item-color-selected': '$color-brand1-9',
  '$navigation-line-item-custom-color-hover': '$color-brand1-6',
  '$navigation-line-item-custom-color-selected': '$color-brand1-9',
  '$navigation-line-item-leaf-color-hover': '$color-brand1-6',
  '$navigation-line-item-leaf-color-selected': '$color-brand1-6',
  '$navigation-tree-item-color-selected': '$color-brand1-6',
  '$navigation-tree-item-custom-icon-color-selected': '$color-brand1-6',
  '$navigation-tree-item-line-color-selected': '$color-brand1-6',
  '$pagination-item-current-bg': '$color-brand1-6',
  '$radio-button-border-color-hovered': '$color-brand1-6',
  '$step-arrow-item-finish-background': '$color-brand1-2',
  '$step-arrow-item-title-finish-color': '$color-brand1-6',
  '$step-dot-item-node-process-background': '$color-brand1-6',
  '$step-dot-item-node-process-border-color': '$color-brand1-6',
  '$step-dot-item-title-process-color': '$color-brand1-6',
  '$tag-selectable-normal-border-color-selected': '$color-brand1-6',
  '$tag-selectable-normal-border-color-selected-hover': '$color-brand1-6',
  '$tag-selectable-normal-text-color-selected': '$color-brand1-6',
  '$tag-selectable-normal-text-color-selected-hover': '$color-brand1-6',
  '$tag-selectable-tail-bg-color': '$color-brand1-6',
  '$tag-selectable-primary-background-color-hover': '$color-brand1-6',
  '$tag-selectable-primary-text-color': '$color-brand1-6',
  '$tag-selectable-primary-background-color': '$color-brand1-1',
  '$tag-selectable-normal-tail-bg-color': '$color-brand1-6',
  '$tag-selectable-normal-background-color-hover': '$color-brand1-6',
  '$tag-selectable-normal-background-color-selected-hover': '$color-brand1-1',
  '$tag-selectable-normal-tail-bg-color-selected-hover': '$color-brand1-6',
  '$tag-deletable-primary-background-color': '$color-brand1-6',
  '$tag-deletable-primary-icon-background-color': '$color-brand1-6',
  '$tag-deletable-primary-background-color-hover': '$color-brand1-9',
  '$tag-deletable-primary-icon-background-color-hover': '$color-brand1-9',
  '$tag-interactive-border-color-hover': '$color-brand1-6',
  '$tag-interactive-number-color-hover': '$color-brand1-6',
  '$tag-interactive-r-background-color-hover': '$color-brand1-6',
  '$tag-link-primary-background-color-hover': '$color-brand1-1',
  '$tag-link-primary-text-color': '$color-brand1-6',
  '$tag-link-primary-text-color-hover': '$color-brand1-9',
  '$tag-readonly-background-color': '$color-brand1-2',
  '$tag-readonly-text-color': '$color-brand1-5',
  '$time-picker-cell-selected-color': '$color-brand1-6',
  '$tree-node-hover-background-rgb': '$color-brand1-1',
  '$tree-node-hover-color': '$color-brand1-6',
  '$tree-node-select-color': '$color-brand1-6',
  '$tree-node-selected-color': '$color-brand1-6',
  '$tree-switch-hover-arrow-color': '$color-brand1-6',
  '$tree-switch-hover-bg-color': '$color-brand1-2',
  '$tree-switch-hover-border-color': '$color-brand1-6',
  '$tree-switch-hover-icon-color': '$color-brand1-6',
  '$upload-select-card-border-color-hover': '$color-brand1-6',
  '$color-b1-1': '$color-brand1-1 !default',
  '$color-b1-2': '$color-brand1-2 !default',
  '$color-b1-3': '$color-brand1-3 !default',
  '$color-b1-4': '$color-brand1-4 !default',
  '$color-b1-5': '$color-brand1-5 !default',
  '$color-b1-6': '$color-brand1-6 !default',
  '$color-b1-7': '$color-brand1-7 !default',
  '$color-b1-8': '$color-brand1-8 !default',
  '$color-b1-9': '$color-brand1-9 !default',
  '$color-b1-10': '$color-brand1-10 !default',
};

const primaryColorDeltas = [
  {
    h: -0.36246534825751553,
    s: -0.01918060638619346,
    l: 0.3411764705882353,
  },
  { h: -0.05191458199037887, s: 0, l: 0.3915032679738562 },
  { h: 0.16640986132510704, s: 0, l: 0.3006535947712418 },
  {
    h: -0.5714285714286215,
    s: 0.03777375929274671,
    l: 0.2111111111111111,
  },
  {
    h: 0.0357002916975091,
    s: -0.013050416531429182,
    l: 0.16732026143790849,
  },
  { h: 0, s: 0, l: 0 },
  {
    h: -3.6745234825255793,
    s: -0.007947717820399462,
    l: 0.06993464052287579,
  },
  {
    h: 1.4481685978691796,
    s: 0.0734880450070322,
    l: 0.005882352941176505,
  },
  {
    h: 0.560458272778682,
    s: -0.08595629619978884,
    l: -0.14509803921568626,
  },
  {
    h: 7.103396603396608,
    s: 0.0021812200529213975,
    l: -0.122875816993464,
  },
];

// 副品牌色组件功能色关系映射
const secondaryColorMap = {
  '$nav-secondary-hoz-item-hover-bg-color': '$color-brand2-3',
  '$navigation-filling-item-background': '$color-brand2-3',
  '$rating-normal-overlay-color': '$color-brand2-3',
  '$rating-normal-overlay-hover-color': '$color-brand2-3',
  '$rating-grade-low-overlay-hover-color': '$color-brand2-3',
  '$rating-grade-high-overlay-hover-color': '$color-brand2-3',
  '$rating-grade-low-overlay-color': '$color-brand2-3',
  '$switch-normal-on-bg-color': '$color-brand2-3',
  '$tag-selectable-secondary-background-color-hover': '$color-brand2-3',
  '$tag-link-secondary-background-color-hover': '$color-brand2-3',
  '$btn-secondary-bg': '$color-brand2-3',
  '$btn-secondary-bg-hover': '$color-brand2-6',
  '$calendar-card-header-hover-color': '$color-brand2-6',
  '$calendar-card-footer-hover-color': '$color-brand2-6',
  '$nav-secondary-hoz-bg-color': '$color-brand2-6',
  '$nav-secondary-hoz-item-hover-text-color': '$color-brand2-6',
  '$navigation-filling-item-background-selected': '$color-brand2-6',
  '$navigation-filling-item-color': '$color-brand2-6',
  '$navigation-filling-item-custom-icon-color': '$color-brand2-6',
  '$navigation-filling-item-leaf-icon-color': '$color-brand2-6',
  '$switch-hover-on-bg-color': '$color-brand2-6',
  '$tag-selectable-secondary-border-color-selected': '$color-brand2-6',
  '$tag-selectable-secondary-border-color-selected-hover': '$color-brand2-6',
  '$tag-selectable-secondary-text-color-selected': '$color-brand2-6',
  '$tag-selectable-secondary-text-color-selected-hover': '$color-brand2-6',
  '$tag-selectable-secondary-tail-bg-color': '$color-brand2-6',
  '$tag-selectable-secondary-tail-bg-color-selected-hover': '$color-brand2-6',
  '$tag-selectable-secondary-text-color': '$color-text1-3',
  '$tag-link-secondary-text-color': '$color-brand2-6',
  '$timeline-item-process-background': '$color-brand2-6',
  '$tag-selectable-secondary-background-color-selected-hover':
    '$color-brand7-6',
  '$tag-selectable-secondary-background-color': '$color-brand7-6',
  '$color-b2-6': '$color-brand2-6 !default',
  '$color-b2-3': '$color-brand2-3 !default',
  '$color-b7-6': '$color-brand7-6 !default',
};

module.exports = {
  primaryColorMap,
  primaryColorDeltas,
  secondaryColorMap,
  secondaryLightDelta: {
    h: 7.352941176470587,
    s: 0,
    l: 0.0137254901960784,
  },
  secondaryLighterDelta: {
    h: 7.352941176470587,
    s: 0,
    l: 0.0257324567524675,
  },
};
